﻿using System;
using System.Threading;

namespace SignalingDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            var signal = new ManualResetEvent(false);
            new Thread(() =>
            {
                Console.WriteLine("等待Signal");
                signal.WaitOne();
                Console.WriteLine("接收");
                Console.WriteLine("再次关闭");
                signal.Reset();
                signal.WaitOne();
                Console.WriteLine("接收");
            }).Start();

            Thread.Sleep(3000);
            signal.Set();
            Thread.Sleep(3000);
            signal.Set();
        }
    }
}
